package com.zxc.database;

import java.sql.SQLException;

import com.zxc.domain.TableInfo;

public class DB2 implements DataBase {

	private int start;
	
	private int end;

	public void queryTableComments(TableInfo tableInfo) throws SQLException {
		
	}

	public String getPageSqls(String sql) {

		String pageSql = "select b.*  from (select a.*, rownumber() over() as rowid  from ("
			+ sql
			+ ") a) b "
			+ " where b.rowid > ?  and b.rowid <= ?";
		return pageSql;
	}

	public int getEndIndex() {
		return this.end;
	}

	public int getStartIndex() {
		return this.start;
	}

	public void setEndIndex(int end) {
		this.end = end;
	}

	public void setStartIndex(int start) {
		this.start = start;
	}

}
